package com.ruibang.glass.material.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruibang.glass.material.domain.req.MaterialDullnessReq;
import com.ruibang.glass.material.domain.req.MaterialInAndOutRecordReq;
import com.ruibang.glass.material.domain.req.MaterialRQDullnessReq;
import com.ruibang.glass.material.domain.req.MaterialRecordsReq;
import com.ruibang.glass.material.domain.req.ycl.ManageOutInReq;
import com.ruibang.glass.material.dto.MaterialDullnessDTO;
import com.ruibang.glass.material.dto.MaterialRecordsDTO;
import com.ruibang.glass.material.dto.MaterialRqDullnessDTO;
import com.ruibang.glass.material.dto.OutAndInManagementDTO;
import com.ruibang.glass.material.entity.MaterialALLInventoryManagement;
import com.ruibang.glass.material.entity.MaterialALLOutboundManagement;
import com.ruibang.glass.material.entity.bcp.MaterialBcpProductsInInfo;
import com.ruibang.glass.material.entity.cp.MaterialCPProductsInInfo;
import com.ruibang.glass.material.entity.ycl.MaterialManagementInventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 出库管理表 Mapper 接口
 * </p>
 *
 * @author mameng
 * @since 2024-04-01
 */
@Mapper
public interface GMaterialALLOutboundManagementMapper extends BaseMapper<MaterialALLOutboundManagement> {

    IPage<MaterialALLOutboundManagement> getPage(Page<MaterialALLOutboundManagement> page, @Param("material") MaterialInAndOutRecordReq material);

    MaterialALLInventoryManagement getSumQuantity(@Param("materialALLOutboundManagement") MaterialALLOutboundManagement materialALLOutboundManagement);

    MaterialALLInventoryManagement getYClSumQuantity(@Param("materialALLOutboundManagement") MaterialALLOutboundManagement materialALLOutboundManagement);

    /**
     * @param page
     * @param materialInAndOutRecordReq
     * @return
     */
    Page<MaterialCPProductsInInfo> getCPPageList(Page<MaterialCPProductsInInfo> page, @Param("material") MaterialInAndOutRecordReq materialInAndOutRecordReq);

    Page<MaterialRecordsDTO> getRQPageList(Page<MaterialRecordsDTO> page, @Param("material") MaterialRecordsReq materialRecordsReq);

    Page<MaterialBcpProductsInInfo> getBCPPageList(Page<MaterialBcpProductsInInfo> page, @Param("material") MaterialInAndOutRecordReq materialInAndOutRecordReq);

    /**
     * @param page
     * @param materialDullnessReq
     * @return
     */
    Page<MaterialManagementInventory> getAllDullnessList(Page<MaterialManagementInventory> page, @Param("material") MaterialDullnessReq materialDullnessReq);

    /**
     * @param page
     * @param materialDullnessReq
     * @return
     */
    Page<MaterialManagementInventory> getAllCPDullnessList(Page<MaterialManagementInventory> page, @Param("material") MaterialDullnessReq materialDullnessReq);

    Page<MaterialManagementInventory> getAllBCPDullnessList(Page<MaterialManagementInventory> page, @Param("material") MaterialDullnessReq materialDullnessReq);

    /**
     * @param page
     * @param materialDullnessReq
     * @return
     */
    Page<MaterialManagementInventory> getWarehouseDullnessList(Page<MaterialManagementInventory> page, @Param("material") MaterialDullnessReq materialDullnessReq);


    Page<MaterialRqDullnessDTO> getRqDullnessList(Page<MaterialRqDullnessDTO> page, @Param("material") MaterialRQDullnessReq materialDullnessReq);


    Page<MaterialDullnessDTO> getMaterialDullnessList(Page<MaterialDullnessDTO> page, @Param("materialDullnessReq") MaterialDullnessReq materialDullnessReq);


    void updateOutStatus(@Param("tableName") String tableName, @Param("id") String id);





}
